<%@include file="/WEB-INF/common/taglibs.jsp"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<script>
$(document).ready(function(){
	
	if($('#datepicker').length) {
		$("#datepicker").datepicker({
			dateFormat: 'yy-mm-dd',
			showOtherMonths:true
		});
	}
	
	
});


</script>
 
<form action="${ctx}/admin/facility-booking/create/" method="post">
<div class="row-fluid">
	<div class="span6">

		<div class="box">
			<input type="hidden" name="id" value="${facilityBooking.id}" />
			<div class="title">
				<h4 class="clearfix">
				<span class="left">Create Booking for ${facility.name} </span>
					<span class="box-form right">
							<button class="btn btn-success btn-mini" type="submit">Confirm</button>
					</span>
				</h4>
			</div>
			<div class="content form-horizontal clearfix">
				<div class="form-row row-fluid">
					<div class="span12">
						<div class="row-fluid">
							<label class="form-label span4">Session </label>
							<div class="span8 controls">
								<select name="bookingSessionId">
								<c:forEach var="bookingSession" items="${bookingSessions}">
									<option value="${bookingSession.id}">${bookingSession.fromTo}</option>
								</c:forEach>
								</select>
							</div>
						</div>
					</div>
				</div>
				
					<div class="form-row row-fluid">
					<div class="span12">
						<div class="row-fluid">
							<label class="form-label span4">Resident </label>
							<div class="span8 controls" id="currencyPair">
								<select name="residentId">
								<c:forEach var="resident" items="${residents}">
									<option value="${resident.id}"> ${resident.unitNumber}  ${resident.userName} </option>
								</c:forEach>
								</select>
							</div>
						</div>
					</div>
					
						<div class="form-row row-fluid">
							<label class="form-label span4">Book Date</label>
							<input class="span8" id="datepicker" readonly="readonly"  name="bookingDate" style="cursor: pointer;" />
						</div>
				</div>

			</div>
		</div>
	</div>
</div>
</form>

